<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>网站</title>
    <!-- <link rel="stylesheet" href="/myWeb/static/index.css"> -->

</head>
<body>
    <button id="gittee">hjdc</button>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script src="/myWeb/static/$.js"></script>
<script src="/myWeb/static/request.js"></script>
<script>
    //https://gitee.com/oauth/authorize?client_id={client_id}&redirect_uri={redirect_uri}&response_type=code
    const client_id='5a08e5a2b877b3df0602724eae63ba6e20a774bf0ecf108d924fd5da0b852b09';
    const ClientSecret ='04cfc5e3aba8eb28b405b8cb9db5ecc61d9fe90d03a01ca2cf0ea815a34ca1b3';
    const redirect_uri ='http://localhost:3000/myWeb';
    $('gittee').addEventListener('click',(e)=>{
    window.location.href=`https://gitee.com/oauth/authorize?client_id=${client_id}&redirect_uri=${redirect_uri}&response_type=code`
    })
    const code=window.location.search.substring(6)
    console.log(code);
    if(code){
   
    }
    // request.get('/').then(res => {
    // console.log(res.data, 'res');
    // })

</script>
</body>
</html>